home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Slider / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  3KB  |  133 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Slider    \
  4.  
  5.  
  6. LibName        =    Slider
  7.  
  8.  
  9.  
  10. # Template makefile to make Straylight Dynamic Link 
  11. # Library from a DeskLib sublibrary's .o files
  12. #
  13. # The DLL is made in the directory 
  14. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  15. # and has the same name as the DeskLib sublibrary.
  16. #
  17. # Julian Smith 17 Apr 1995.
  18.  
  19. # The macro $(ObjectFiles) should be set at the 
  20. # start of this file, to be a space-separated
  21. # list of object files.
  22. # This is done by 'Makatic'.
  23.  
  24. # The macro $(LibName) should also be set at the 
  25. # start of this file, to be the name of the 
  26. # DeskLib sublibrary.
  27. # This is done by 'Makatic'.
  28.  
  29. # Note that this makefile doesn't use cc at all
  30. # - it merely links existing .o files.
  31.  
  32. # Linker flags, These can be anything. 
  33. # All flags required by Straylight (eg Link -rmf) 
  34. # are included in the $(LINK) macro.
  35. #
  36. LinkFlags    =    $(LinkExtra)
  37.  
  38.  
  39. # Macros for commands, including the Straylight
  40. # tool 'cdll'. Note that DRLink doesn't seem to
  41. # work with the SDLS.
  42. #
  43. LINK        =    Link -rmf
  44. CDLL        =    cdll
  45.  
  46.  
  47. # Filename of the thing we need to make: - the main
  48. # dynamically-linked library, which will go in the 
  49. # !DLL application.
  50. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  51. # application) should be the same as the 'name' field in the
  52. # $(DLL_Def) file. In this case, this is $(LibName).
  53. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  54.  
  55.  
  56. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  57. #
  58. DLL_Header    =    Header
  59. DLL_Def        =    ^.DLLDef
  60. DLL_Stubs    =    Stubs
  61.  
  62.  
  63.  
  64. # -------------------------------------------------------
  65. # Everything below here should probably not be changed...
  66. # -------------------------------------------------------
  67.  
  68.  
  69. # Extra libs, written by Straylight, which always need to be linked into a DLL
  70. #
  71. SDLS_ExtraObjects=                    \
  72.             C:DLLLib.o.DLLLib        \
  73.             C:DLLLib.o.dstubs        \
  74.  
  75.  
  76. # Extra DeskLib libraries which need to be linked into the final DLL.
  77. # The DLL DeskLib library is included here because some DeskLib DLLs may
  78. # refer to other DeskLib DLLs.
  79. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  80. # the sublibraries for which there is a DLL - just the DLL Stubs file
  81. # is included for these.
  82. #
  83. DeskLib_ExtraObjects=                \
  84.             DeskLib:o.DLLDLL    \
  85.  
  86.  
  87.  
  88.  
  89. #Here's what we want to make...
  90.  
  91. All:    $(DLL_Lib)
  92.  
  93. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  94.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  95.  
  96.  
  97.  
  98. # Here's how to make the things which are needed in the above rules
  99.  
  100. $(DLL_Def):    
  101.     | Error: No DLL definition file exists.
  102.     |        You should run th MkStubsOs makefile
  103.     |        and then alter the template Def
  104.     |        file by hand.
  105.  
  106. $(DLL_Header):    $(DLL_Def)
  107.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  108.  
  109.  
  110. # Rule for compiling C source code for a Straylight dynamically-linked library.
  111. # Actually, we don't call cc - we complain and tell the user to run the 
  112. # MkStubsOs makefile.
  113.  
  114. VPATH = @.^
  115.  
  116. .SUFFIXES:    .o .c .s
  117. .c.o:
  118.     | $@ needs recompiling. This should be done by
  119.     | running the MkStubsOs or MkOs makefile before running
  120.     | this makefile.
  121.     |
  122.  
  123. .s.o:
  124.     | $@ needs assembling. This should be done by
  125.     | running the MkStubsOs or MkOs makefile before running
  126.     | this makefile.
  127.     |
  128.  
  129.  
  130.  
  131. # Dynamic dependencies:
  132.